<?php require VIEW_ROOT.'/common/header.php'?>

<div class="info">
	<a href="?m=finance&a=inc_add">添加收入</a>
</div>

<?php foreach ($income_by_mouth as $row) : ?>
<table>
	<tr>
		<th width="80">时间</th>
		<th width="100">说明</th>
		<th width="80">金额</th>
		<th width="80">操作</th>
		<th></th>
	</tr>
	<?php foreach ($row as $item) : ?>
	<tr>
		<td><?php echo date('Y-m-d', $item['create_time'])?></td>
		<td><?php echo $item['inc_name']?></td>
		<td><b><?php echo library_common::money_num($item['amount'])?></b></td>
		<td>
			<a href="?m=finance&a=inc_edit&inc_id=<?php echo $item['inc_id']?>">编辑</a>
			<a href="?m=finance&a=inc_delete&inc_id=<?php echo $item['inc_id']?>" onclick="return confirm('确认要删除?')">删除</a>
		</td>
		<td></td>
	</tr>
	<?php endforeach; ?>
</table>
<?php endforeach; ?>

<div class="info">
	总计：<b><?php echo $sum; ?></b>
</div>

<?php require VIEW_ROOT.'/common/footer.php'?>